package com.mdtx.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class LogHelper {

    private static Logger log = null;

    public static void log(String message){
        log = LoggerFactory.getLogger("");
        log.info(message);
    }

    public static void error(String message){
        log = LoggerFactory.getLogger("");
        log.error(message);
    }


    public static void info(String message,Class clazz){
        getLogger(clazz);
        log.info(message);

    }

    public static void info(String message,Throwable e,Class clazz){
        getLogger(clazz);
        log.info(message,e);
    }

    public static void error(String message,Class clazz){
        getLogger(clazz);
        log.error(message);

    }

    public static void error(String message,Throwable e,Class clazz){
        getLogger(clazz);
        log.error(message,e);
    }

    public static void getLogger(Class clazz){
        log = LoggerFactory.getLogger(clazz);
    }
}
